package test3;

public class TestBegain3 {
    public static void main(String[] args) {
        Student s =new Student();
        Teacher t = new Teacher();
        Administrator a = new Administrator();
        s.setAge(18);
        s.setName("张三");

        t.setAge(30);
        t.setName("王五");

        a.setAge(40);
        a.setName("李四");

        register(s);
        register(t);
        register(a);
    }
    public static void register(Person p){
        p.show();
    }
}
